gtk_widget_get_allocated_baseline (widget),
&clip);
- clip.x += allocation->x;
- clip.y += allocation->y;
gtk_widget_set_clip (widget, &clip);
}
GtkFlowBox *box = GTK_FLOW_BOX (widget);
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
GtkAllocation clip;
- GtkAllocation child_allocation;
gtk_widget_set_allocation (widget, allocation);
allocation->x, allocation->y,
allocation->width, allocation->height);
- child_allocation.x = 0;
- child_allocation.y = 0;
- child_allocation.width = allocation->width;
- child_allocation.height = allocation->height;
-
gtk_css_gadget_allocate (BOX_PRIV (widget)->gadget,
- &child_allocation,
+ allocation,
gtk_widget_get_allocated_baseline (widget),
&clip);
GtkWidget *widget = gtk_css_gadget_get_owner (gadget);
GtkFlowBox *box = GTK_FLOW_BOX (widget);
GtkFlowBoxPrivate *priv = BOX_PRIV (box);
+ GtkAllocation widget_allocation;
GtkAllocation child_allocation;
gint avail_size, avail_other_size, min_items, item_spacing, line_spacing;
GtkAlign item_align;
gint i, this_line_size;
GSequenceIter *iter;
+ gtk_widget_get_allocation (widget, &widget_allocation);
+
min_items = MAX (1, priv->min_children_per_line);
if (priv->orientation == GTK_ORIENTATION_HORIZONTAL)
* Prepare item/line initial offsets and jump into the
* real allocation loop.
*/
- line_offset = allocation->y;
- item_offset = allocation->x;
+ line_offset = allocation->y - widget_allocation.y;
+ item_offset = allocation->x - widget_allocation.x;
/* prepend extra space to item_offset/line_offset for SPREAD_END */
item_offset += get_offset_pixels (item_align, extra_pixels);
}
}
- item_offset = allocation->x;
+ item_offset = allocation->x - widget_allocation.x;
if (item_align == GTK_ALIGN_CENTER)
{